<link type="text/css" href="<?php echo base_url();?>assets/js/development-bundle/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo base_url();?>assets/js/development-bundle/ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/development-bundle/ui/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/development-bundle/ui/jquery.ui.widget.js"></script>
<script language="javascript">
	$(document).ready(function(){
		$(".tgl").datepicker({
			changeMonth: true,
			changeYear: true,
			monthNamesShort: [ "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "Nopember", "Desember" ],
			dayNames: [ "Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu" ],
			dayNamesMin: [ "M", "S", "S", "R", "K", "J", "S" ],
			dateFormat:"dd-mm-yy",
			buttonImageOnly: true
		});
	});
</script>
<style>
.report1,.report2{
display:none;
}
</style>
<?php
echo form_open("/cetak/", array("name"=>"form_cetak","id"=>"medic_form"));
	$tgl_awal	= set_value("tgl_awal");
	$tgl_akhir	= set_value("tgl_akhir");
	$batas_atas	= set_value("batas_atas");
	$batas_bawah	= set_value("batas_bawah");
?>
<p>
	<label>Jenis Report</label>
	<select name="pilihan" id="pilihan">
		<option value=""></option>
		<option value="1">Absensi Mahasiswa</option>
		<option value="2">Statistik Mahasiswa</option>
	</select>
</p>
<p class="report1">
	<label>Batas Bawah</label>
	<input type="text" name="batas_bawah" value="<?php echo $batas_bawah; ?>">
	<?php echo form_error("batas_bawah"); ?>
</p>
<p class="report1">
	<label>Batas Atas</label>
	<input type="text" name="batas_atas" value="<?php echo $batas_atas; ?>">
	<?php echo form_error("batas_atas"); ?>
</p>
<p class="report2">
	<label>Tanggal Awal</label>
	<input type="text" name="tgl_awal" value="<?php echo $tgl_awal; ?>" class="tgl">
	<?php echo form_error("tgl_awal"); ?>
</p>
<p class="report2">
	<label>Tanggal Akhir</label>
	<input type="text" name="tgl_akhir" value="<?php echo $tgl_akhir; ?>" class="tgl">
	<?php echo form_error("tgl_akhir"); ?>
</p>
<p>
	<input type="submit" class="btn btn-primary" id="submit" value="Simpan">
	<input type="reset" class="btn btn-primary" id="submit" value="Reset">
</p>
<?php echo form_close(); ?>
<script language="javascript">
	$("#pilihan").change(function(){
		if($("#pilihan").val() == 1){
			$(".report1").show();
			$(".report2").hide();
		} else {
			$(".report1").hide();
			$(".report2").show();
		}
	});
</script>